<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                template="../WEB-INF/templates/frontend.xhtml">
    <ui:param name="title" value="Search results"/>
    <ui:define name="content">
        <h:dataTable value="#{searchBean.resultList}" var="user" id="search-results" rendered="#{! empty searchBean.resultList}">
            <h:column headerClass="name">
                <f:facet name="header" >
                    <h:outputText value="Name"/>
                </f:facet>
                <h:outputLink value="/pling.nbp/user/viewprofile.xhtml?id=#{user.id}">
                    <h:outputText value="#{user.name}"/>
                </h:outputLink>
            </h:column>
            <h:column headerClass="email">
                <f:facet name="header">
                    <h:outputText value="E-mail"/>
                </f:facet>
                <h:outputLink value="/pling.nbp/user/viewprofile.xhtml?id=#{user.id}">
                    <h:outputText value="#{user.email}"/>
                </h:outputLink>
            </h:column>
        </h:dataTable>
        <h:outputText rendered="#{empty searchBean.resultList}" value="No results matching your query." />
    </ui:define>
</ui:composition>